package com.version.manager.controller.shop;

import com.version.manager.controller.BaseController;
import com.version.manager.entity.Shop.shopCategoryDetail;
import com.version.manager.model.Msg;
import com.version.manager.service.Shop.shopCategoryDetailService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@Api(value = "shopCategoryController")
@RequestMapping("/api/shop/categoryDetail")
public class shopCategoryDetailController extends BaseController<shopCategoryDetailService, shopCategoryDetail> {
    @Autowired
    private shopCategoryDetailService service;
    @RequestMapping(value = "save",method = RequestMethod.POST)
    @ResponseBody
    public Msg save(@RequestBody shopCategoryDetail data){
        return service.save(data);
    }
    @RequestMapping(value = "getDetail",method = RequestMethod.GET)
    @ResponseBody
    public Msg getDetail(HttpServletRequest request){
        String categoryId=request.getParameter("categoryId");
        return service.getDetail(categoryId);
    }

//    @RequestMapping(value = "getDetail",method = RequestMethod.GET)
//    @ResponseBody
//    public Msg getDetail(String categoryId){
//        return service.save(categoryId);
//    }
}
